package com.ws.boot.demo.validate.entity;

import com.ws.boot.demo.validate.validation.groups.Update;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

/**
 * 身份证详情 .
 *
 * @className: IdCardDetail4
 * @author: ws
 * @date: 2020/4/14 15:01
 * @version: 1.0.0
 */
@Accessors(chain = true)
@Data
public class IdCardDetail4 {

    /**
     * 地址
     */
    @NotBlank
    private String address;

    /**
     * 年龄
     */
    @Min(value = 1, groups = {Update.class})
    @Max(value = 18, groups = {Update.class})
    private int age;
}
